{% extends 'generic/object_retrieve.html' %}
{% load buttons %}
{% load plugins %}
{% load helpers %}

{% block extra_nav_tabs %}
    <li class="nav-item" role="presentation">
        <a href="{% url 'extras:configcontextschema_object_validation' pk=object.pk %}" class="nav-link{% if active_tab == 'validation' %} active{% endif %}">Validation</a>
    </li>
{% endblock extra_nav_tabs %}

{% block content_left_page %}
    <div class="card">
        <div class="card-header">
            <strong>Config Context Schema</strong>
        </div>
        <table class="table table-hover card-body attr-table">
            <tr>
                <td>Name</td>
                <td>
                    {{ object.name }}
                </td>
            </tr>
            {% if object.owner %}
                <tr>
                    <td>Owner</td>
                    <td>{{ object.owner|hyperlinked_object }}</td>
                </tr>
            {% endif %}
            <tr>
                <td>Description</td>
                <td>{{ object.description|placeholder }}</td>
            </tr>
        </table>
    </div>
{% endblock content_left_page %}

{% block content_right_page %}
    <div class="card">
        <div class="card-header">
            <strong>Data Schema</strong>
            {% include 'extras/inc/configcontext_format.html' %}
        </div>
        <div class="card-body">
            {% include 'extras/inc/json_data.html' with data=object.data_schema format=data_format %}
        </div>
    </div>
{% endblock content_right_page %}
